import request from '@/config/axios'

// 来往单位列表
export const getContactlList = (data) => {
  return request.get({
    url: '/service/company/page',
    params: data
  })
}

// 详情
export const getContactDetail = (id) => {
  return request.get({
    url: '/service/company/get',
    params: { id }
  })
}

// 查询未提交详情
export const getContactSaveDetail = (id) => {
  return request.get({
    url: '/service/company/get-save-data',
    params: { id }
  })
}

// 新增员工
export const addContactl = (data) => {
  return request.post({
    url: '/service/company/create',
    data,
  })
}

// 编辑员工
export const editContactl = (data) => {
  return request.put({
    url: '/service/company/update',
    data,
  })
}

// 删除员工
export const deleteContactl = (id) => {
  return request.delete({
    url: '/service/company/delete',
    params: { id }
  })
}

// 导出
export const exportContactl = (data) => {
  return request.download({
    url: '/service/company/export-excel',
    params: data,
  })
}